/*
 Navicat Premium Data Transfer

 Source Server         : localhost_3306
 Source Server Type    : MySQL
 Source Server Version : 50711
 Source Host           : localhost:3306
 Source Schema         : sta

 Target Server Type    : MySQL
 Target Server Version : 50711
 File Encoding         : 65001

 Date: 20/03/2023 08:48:53
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for class
-- ----------------------------
DROP TABLE IF EXISTS `class`;
CREATE TABLE `class` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `school_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of class
-- ----------------------------
BEGIN;
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (1, '软件1班', '2023-02-26 12:08:06', 2);
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (2, '人文1班', '2023-03-07 17:23:18', 3);
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (3, '计科一班', '2023-03-08 08:22:32', 2);
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (4, '物电一班', '2023-03-08 08:22:48', 4);
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (5, '能机一班', '2023-03-08 08:23:04', 5);
INSERT INTO `class` (`id`, `class_name`, `created_at`, `school_id`) VALUES (6, '计科2班', '2023-03-08 08:23:28', 2);
COMMIT;

-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `course_name` varchar(255) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of course
-- ----------------------------
BEGIN;
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (1, '计算机技术与科学', 2, '2023-02-26 12:17:21');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (2, '马克思主义', 1, '2023-03-05 09:48:03');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (3, 'java开发', 2, '2023-03-08 08:24:20');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (4, 'C语言', 2, '2023-03-08 08:24:33');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (5, 'ps设计', 1, '2023-03-08 08:24:56');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (6, 'python开发', 2, '2023-03-08 08:25:11');
INSERT INTO `course` (`id`, `course_name`, `category_id`, `created_at`) VALUES (7, '中国近代史', 1, '2023-03-08 08:29:02');
COMMIT;

-- ----------------------------
-- Table structure for course_student
-- ----------------------------
DROP TABLE IF EXISTS `course_student`;
CREATE TABLE `course_student` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `course_start_id` int(11) DEFAULT NULL,
  `student_id` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `category_id` int(11) NOT NULL,
  `teacher_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of course_student
-- ----------------------------
BEGIN;
INSERT INTO `course_student` (`id`, `course_start_id`, `student_id`, `created_at`, `course_id`, `category_id`, `teacher_id`) VALUES (9, 9, 14, '2023-03-08 09:48:14', 5, 1, 6);
INSERT INTO `course_student` (`id`, `course_start_id`, `student_id`, `created_at`, `course_id`, `category_id`, `teacher_id`) VALUES (10, 9, 12, '2023-03-08 10:00:19', 5, 1, 6);
INSERT INTO `course_student` (`id`, `course_start_id`, `student_id`, `created_at`, `course_id`, `category_id`, `teacher_id`) VALUES (11, 8, 12, '2023-03-08 10:36:28', 6, 2, 4);
COMMIT;

-- ----------------------------
-- Table structure for course_teacher
-- ----------------------------
DROP TABLE IF EXISTS `course_teacher`;
CREATE TABLE `course_teacher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `total` int(11) DEFAULT NULL COMMENT '总人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of course_teacher
-- ----------------------------
BEGIN;
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (4, 1, 7, 5, '2023-03-07 18:46:49', 60);
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (5, 1, 2, 5, '2023-03-07 18:47:08', 50);
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (6, 2, 1, 4, '2023-03-08 08:26:57', 50);
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (7, 2, 3, 4, '2023-03-08 08:27:19', 60);
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (8, 2, 6, 4, '2023-03-08 08:28:11', 71);
INSERT INTO `course_teacher` (`id`, `category_id`, `course_id`, `teacher_id`, `created_at`, `total`) VALUES (9, 1, 5, 6, '2023-03-08 08:30:31', 60);
COMMIT;

-- ----------------------------
-- Table structure for day
-- ----------------------------
DROP TABLE IF EXISTS `day`;
CREATE TABLE `day` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `score` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of day
-- ----------------------------
BEGIN;
INSERT INTO `day` (`id`, `student_id`, `course_id`, `teacher_id`, `score`, `created_at`) VALUES (5, 12, 1, NULL, '是', '2023-03-08 08:57:14');
INSERT INTO `day` (`id`, `student_id`, `course_id`, `teacher_id`, `score`, `created_at`) VALUES (6, 13, 1, NULL, '否', '2023-03-08 10:33:29');
COMMIT;

-- ----------------------------
-- Table structure for school
-- ----------------------------
DROP TABLE IF EXISTS `school`;
CREATE TABLE `school` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `school_name` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of school
-- ----------------------------
BEGIN;
INSERT INTO `school` (`id`, `school_name`, `created_at`) VALUES (2, '计算机与信息学院', '2023-02-26 12:18:12');
INSERT INTO `school` (`id`, `school_name`, `created_at`) VALUES (3, '中文与新闻传播学院', '2023-03-07 17:18:25');
INSERT INTO `school` (`id`, `school_name`, `created_at`) VALUES (4, '物理与电子信息学院', '2023-03-08 08:21:19');
INSERT INTO `school` (`id`, `school_name`, `created_at`) VALUES (5, '能源与机械学院', '2023-03-08 08:22:05');
COMMIT;

-- ----------------------------
-- Table structure for score
-- ----------------------------
DROP TABLE IF EXISTS `score`;
CREATE TABLE `score` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  `score` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `category_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of score
-- ----------------------------
BEGIN;
INSERT INTO `score` (`id`, `student_id`, `course_id`, `teacher_id`, `score`, `created_at`, `category_id`) VALUES (3, 0, 2, NULL, '100', '2023-03-08 10:49:06', 1);
COMMIT;

-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` int(11) DEFAULT NULL,
  `student_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
  `school_id` int(11) DEFAULT NULL,
  `class_id` int(11) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
  `sex` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 DEFAULT '123456',
  `status` int(11) DEFAULT '0',
  `type` varchar(255) DEFAULT 'student',
  `birthday` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of student
-- ----------------------------
BEGIN;
INSERT INTO `student` (`id`, `number`, `student_name`, `school_id`, `class_id`, `created_at`, `sex`, `password`, `status`, `type`, `birthday`, `age`, `email`, `phone`) VALUES (12, 2001, '李同学', 2, 1, '2023-03-08 09:10:51.144332', '男', '1234567', 1, 'student', NULL, NULL, NULL, NULL);
INSERT INTO `student` (`id`, `number`, `student_name`, `school_id`, `class_id`, `created_at`, `sex`, `password`, `status`, `type`, `birthday`, `age`, `email`, `phone`) VALUES (13, 2002, '斯同学', 3, 2, '2023-03-08 10:29:59.217493', '男', '123456', 1, 'student', NULL, NULL, NULL, NULL);
INSERT INTO `student` (`id`, `number`, `student_name`, `school_id`, `class_id`, `created_at`, `sex`, `password`, `status`, `type`, `birthday`, `age`, `email`, `phone`) VALUES (14, 2003, '张三', 2, 3, '2023-03-08 09:11:06.382928', '男', '123456', 1, 'student', NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for teacher
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` int(11) DEFAULT NULL,
  `teacher_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
  `school_id` int(11) DEFAULT NULL,
  `class_id` int(11) DEFAULT NULL,
  `course_id` int(11) DEFAULT NULL,
  `password` varchar(255) DEFAULT '123456',
  `created_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
  `type` varchar(255) DEFAULT 'teacher',
  `sex` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
  `birthday` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of teacher
-- ----------------------------
BEGIN;
INSERT INTO `teacher` (`id`, `number`, `teacher_name`, `school_id`, `class_id`, `course_id`, `password`, `created_at`, `type`, `sex`, `birthday`, `age`, `email`, `phone`) VALUES (4, 1001, '王老师', 2, 1, NULL, '123', '2023-03-08 10:34:00.089142', 'teacher', '男', '2023-00-17', 31, '334252425', '1224232');
INSERT INTO `teacher` (`id`, `number`, `teacher_name`, `school_id`, `class_id`, `course_id`, `password`, `created_at`, `type`, `sex`, `birthday`, `age`, `email`, `phone`) VALUES (5, 1002, '张老师', 3, NULL, NULL, '123456', '2023-03-07 18:44:11.000000', 'teacher', '女', NULL, NULL, NULL, NULL);
INSERT INTO `teacher` (`id`, `number`, `teacher_name`, `school_id`, `class_id`, `course_id`, `password`, `created_at`, `type`, `sex`, `birthday`, `age`, `email`, `phone`) VALUES (6, 1003, '赵老师', 2, NULL, NULL, '123456', '2023-03-08 08:29:35.000000', 'teacher', '男', NULL, NULL, NULL, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
